The first step is to provide an effect description. The code shown in Listing 7 is very similar to the code described in "Creating an Effect Description" .
Listing 7 Providing an effect description
{
QTAtomContainer myEffectDesc = nil;
OSType myType;
OSErr myErr = noErr;
long myLong;
// Create a new, empty effect description
myErr = QTNewAtomContainer(&myEffectDesc);
// This example is an effect description for an SMPTE effect
myType = OSTypeConst('smpt');
myErr = QTInsertChild(myEffectDesc,
kParentAtomIsContainer,
kParameterWhatName,
kParameterWhatID,
0,
sizeof(myType),
&myType,
nil);
// Now reference the two sources to be used. These will not be items
// in an input map. Instead the source names used will be resolved in
// the decompression sequence.
myType = OSTypeConst('srcA');
myErr = QTInsertChild(myEffectDesc,
kParentAtomIsContainer,
kEffectSourceName,
1,
0,
sizeof(myType),
&myType,
nil);
// Add the second source
myType = OSTypeConst('srcB');
myErr = QTInsertChild(myEffectDesc,
kParentAtomIsContainer,
kEffectSourceName,
2,
0,
sizeof(myType),
&myType,
nil);
// This example uses SMTPE effect number 74, so add a WipeID
// parameter with the value 74
myLong = 74;
myErr = QTInsertChild(myEffectDesc,
kParentAtomIsContainer,
OSTypeConst('wpID'),
1,
0,
sizeof(myLong),
&myLong,
nil);
}
| Previous | Chapter Contents | Chapter Top | Next |